#include <iostream>
#include "WorkManager.h"
//#include "Worker.h"
//#include "employee.h"
//#include "manager.h"
//#include "boss.h"
using namespace std;

int main()
{
// 测试:
//    Worker *worker=new manager(1,"manager",1);
//    worker->ShowTnfo();
//    delete(worker);
//
//    Worker *worker1=new employee(1,"employee",1);
//    worker1->ShowTnfo();
//    delete(worker1);
//
//    Worker *worker2=new boss(1,"boss",1);
//    worker2->ShowTnfo();
//    delete(worker2);

    WorkManager  wm;
    int choice=0;
    while(true){
    wm.Show_Menu();
    cout<<"please input your choice"<<endl;
    cin>>choice;
    switch (choice) {
            //exit
            case 0:
            {
                wm.ExitSystem();
                break;
            }
            //add
            case 1:
            {
                wm.Add_Worker();
                break;
            }
            //show
            case 2:
            {
                wm.Show_Workers();
                break;
            }
            //delect
            case 3:
            {

                wm.Del_Worker();
                break;
            }
            //change
            case 4:
            {
                wm.Change_Worker();
                break;
            }
            //find
            case 5:
            {
                wm.Find_Worker();
                break;
            }
            //sort
            case 6:
            {
                wm.Sort_Worker();
                break;
            }
            //cls
            case 7:
            {
                wm.Cls_Worker();
                break;
            }
            default:
            {
                system("cls");
                cout<<"input errot ,please scanf right"<<endl;
            }
        }
    }

    system("pause");
    return 0;
}